<template>
  <div id="app">
    <LoginPage @login-success="handleLoginSuccess" v-if="bbb"/>
    <el-container v-if="aaa">
      <el-aside width="300px">
        <el-col :span="12">   
  <h1 class="mb-2">
            <el-icon class="custom-icon"><GobletSquareFull /></el-icon>
            五组医疗
          </h1>
    <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <router-link to="/" style="text-decoration: none;">
        <el-menu-item index="1">
        <i class="el-icon-menu"></i>
        <span slot="title">工作台</span>
      </el-menu-item>
         </router-link>
      
         
         <router-link to="/qianyue/" style="text-decoration: none;">
              <el-submenu index="2">
                <template slot="title" >
                  <i class="el-icon-setting"></i>
                  <span>签约管理</span>
                </template>
                <el-menu-item-group>
                  <router-link to="/qianyue/daichuli" style="text-decoration: none;">
                    <el-menu-item index="1-1">待处理签约</el-menu-item>
                  </router-link>
                  <router-link to="/qianyue/jilu/qjilu" style="text-decoration: none;">
                    <el-menu-item index="1-2">签约记录</el-menu-item>
                  </router-link>
                </el-menu-item-group>
              </el-submenu>
            </router-link>
                 
            <router-link to="/serve/" style="text-decoration: none;">
              <el-submenu index="3">
                <template slot="title" >
                  <i class="el-icon-setting"></i>
                  <span>服务管理</span>
                </template>
                <el-menu-item-group>
                  <router-link to="/serve/daichuli" style="text-decoration: none;">
                    <el-menu-item index="1-1">待处理服务</el-menu-item>
                  </router-link>
                  <router-link to="/serve/jilu" style="text-decoration: none;">
                    <el-menu-item index="1-2">服务记录</el-menu-item>
                  </router-link>
                </el-menu-item-group>
              </el-submenu>
            </router-link>
            
            <router-link to="/jumin/" style="text-decoration: none;">
              <el-menu-item index="4">
              <i class="el-icon-menu"></i>  
              <span slot="title">居民管理</span>
              </el-menu-item>
            </router-link>
         
            <router-link to="/message/" style="text-decoration: none;">
              <el-menu-item index="5">
              <i class="el-icon-menu"></i>  
              <span slot="title">消息管理</span>
              </el-menu-item>
            </router-link>
 
            <router-link to="/ziliao/" style="text-decoration: none;">
              <el-submenu index="6">
                <template slot="title" >
                  <i class="el-icon-setting"></i>
                  <span>资料管理</span>
                </template>
                <el-menu-item-group>
                  <router-link to="/ziliao/jigou" style="text-decoration: none;">
                    <el-menu-item index="1-1">机构管理</el-menu-item>
                  </router-link>
                  <router-link to="/ziliao/tuandui" style="text-decoration: none;">
                    <el-menu-item index="1-2">团队管理</el-menu-item>
                  </router-link>
                  <router-link to="/ziliao/yisheng" style="text-decoration: none;">
                    <el-menu-item index="1-3">医生管理</el-menu-item>
                  </router-link>
                  <router-link to="/ziliao/fuwubao" style="text-decoration: none;">
                    <el-menu-item index="1-4">服务包管理</el-menu-item>
                  </router-link>
                  <router-link to="/ziliao/fuwuxiangmu" style="text-decoration: none;">
                    <el-menu-item index="1-5">服务项目管理</el-menu-item>
                  </router-link>
                  <router-link to="/ziliao/yeji" style="text-decoration: none;">
                    <el-menu-item index="1-6">业绩目标管理</el-menu-item>
                  </router-link>
                </el-menu-item-group>
              </el-submenu>
            </router-link>  


            <router-link to="/database/" style="text-decoration: none;">
              <el-submenu index="7">
                <template slot="title" >
                  <i class="el-icon-setting"></i>
                  <span>数据统计</span>
                </template>
                <el-menu-item-group>
                  <router-link to="/database/gaikuang" style="text-decoration: none;">
                    <el-menu-item index="1-1">数据概况</el-menu-item>
                  </router-link>
                  <router-link to="/database/qianyue" style="text-decoration: none;">
                    <el-menu-item index="1-2">签约业绩统计</el-menu-item>
                  </router-link>
                  <router-link to="/database/fuwu" style="text-decoration: none;">
                    <el-menu-item index="1-3">服务业绩统计</el-menu-item>
                  </router-link>
                  <router-link to="/database/jmjiankang" style="text-decoration: none;">
                    <el-menu-item index="1-4">居民健康异常统计</el-menu-item>
                  </router-link>
                  
                  <router-link to="/database/jmbiaoqian" style="text-decoration: none;">
                    <el-menu-item index="1-5">居民标签统计</el-menu-item>
                  </router-link>
                  <router-link to="/database/jmage" style="text-decoration: none;">
                    <el-menu-item index="1-6">居民年龄统计</el-menu-item>
                  </router-link>
                  <router-link to="/database/jmxueli" style="text-decoration: none;">
                    <el-menu-item index="1-7">居民学历统计</el-menu-item>
                  </router-link>
                  <router-link to="/database/jmxingbie" style="text-decoration: none;">
                    <el-menu-item index="1-8">居民性别统计</el-menu-item>
                  </router-link>
                </el-menu-item-group>
              </el-submenu>
            </router-link>

            <router-link to="/xitong/" style="text-decoration: none;">
              <el-submenu index="8">
                <template slot="title" >
                  <i class="el-icon-setting"></i>
                  <span>系统设置</span>
                </template>
                <el-menu-item-group>
                  <router-link to="/xitong/biaoqian" style="text-decoration: none;">
                    <el-menu-item index="1-1">标签管理</el-menu-item>
                  </router-link>
                  <router-link to="/xitong/jiaose" style="text-decoration: none;">
                    <el-menu-item index="1-2">角色管理</el-menu-item>
                  </router-link>
                  <router-link to="/xitong/zixun" style="text-decoration: none;">
                    <el-menu-item index="1-3">资讯管理</el-menu-item>
                  </router-link>
                  <router-link to="/xitong/yaopin" style="text-decoration: none;">
                    <el-menu-item index="1-4">药品管理</el-menu-item>
                  </router-link>
                  <router-link to="/xitong/lunbotu" style="text-decoration: none;">
                    <el-menu-item index="1-5">轮播图管理</el-menu-item>
                  </router-link>
                  <router-link to="/xitong/gonggao" style="text-decoration: none;">
                    <el-menu-item index="1-6">系统公告</el-menu-item>
                  </router-link>
                  <router-link to="/xitong/xieyi" style="text-decoration: none;">
                    <el-menu-item index="1-7">协议管理</el-menu-item>
                  </router-link>
                  <router-link to="/xitong/logs" style="text-decoration: none;">
                    <el-menu-item index="1-8">操作日志</el-menu-item>
                  </router-link>
                </el-menu-item-group>
              </el-submenu>
            </router-link>

    </el-menu>
  </el-col>
        
      </el-aside>
      <el-main style="height: 100%;">
        <router-view/>
      </el-main>
    </el-container>
  </div>

</template>

<script>
import LoginPage from "@/views/login/loginPage.vue";
import axios from "axios";
export default {

  name: 'App',
  data(){
    return {
      aaa:false,
      bbb:true
    }
  },
  components:{
    LoginPage
  },
  methods:{
    handleLoginSuccess() {
      // console.log('aaaaaaa')
      this.aaa = true;
      this.bbb = false;
      // 登录成功后显示容器
    },
    handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
  }
}
</script>

<style>

</style>